package com.ns.scs.props.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ns.scs.props.dto.PropPageDto;
import com.ns.scs.props.entry.PropEntry;
import com.ns.scs.props.mapper.PropEntryMapper;
import com.ns.scs.props.vo.PropEntryVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 参数业务实现
 *
 * @author lw
 * @since 2024/09/23
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class PropServiceImpl extends ServiceImpl<PropEntryMapper, PropEntry> implements IPropService {
    private final PropEntryMapper mapper;

    @Override
    public Page<PropEntryVO> getList(PropPageDto dto) {
        return mapper.getList(dto, new Page<>(dto.getCurrent(), dto.getSize()));
    }

    @Override
    public List<PropEntryVO> getByClazzCode(String clazzCode) {
        return mapper.getByClazzCode(clazzCode);
    }
}
